<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('视频名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('视频地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-url" data-rule="" class="form-control" size="50" name="row[url]" type="text" value="{$row.url|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-url" class="btn btn-danger faupload"
                                  data-input-id="c-url"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="false" data-preview-id="p-cover"><i
                            class="fa fa-upload"></i> 上传</button></span>

                    <span><button type="button" id="fachoose-url" class="btn btn-primary fachoose"
                                  data-input-id="c-cover" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-url"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-url"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排列顺序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" data-rule="required" min="0" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否上架')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-status" name="row[status]" type="hidden" value="{$row.status|htmlentities}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="2">
                <i class="fa fa-toggle-on text-success {eq name="$row.status" value="2"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否免费')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-is_free" name="row[is_free]" type="hidden" value="{$row.is_free|htmlentities}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_free" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success {eq name="$row.is_free" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('绑定合集')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-collection_id" data-rule="required" min="0" data-source="videocollection/index" class="form-control selectpage" name="row[collection_id]" type="text" value="{$row.collection_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('播放方式')}:</label>

        <div class="col-xs-12 col-sm-8">
            {:build_select('row[container]', ['1'=>__('视频组件'), '2'=>__('浏览器组件')], $row.container, ['class'=>'form-control', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Analyze_service')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-analyze_service" min="0" data-source="videoanalyzeservice/index" class="form-control selectpage" name="row[analyze_service]" type="text" value="{$row.analyze_service|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
